<!DOCTYPE html>
<html>
<head>
<title></title>
#parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
			<label class="form-group col-sm-2 control-label text-right" >消息类型：</label>
			<div class="form-group col-sm-2">
				<select class="form-control" v-model="q.messageType" @keyup.enter="query" placeholder="消息类型">
    				<option  v-for="type in typeList" v-bind:value="type.messageTypeName+','+type.displayMode">
      					{{type.messageTypeName}},{{type.displayMode}}
    				</option>
  				</select>
  			</div>
			<label class="form-group col-sm-2 control-label text-right" >消息标题：</label>
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.messageHeader" @keyup.enter="query" placeholder="消息标题">
			</div>
			<label class="form-group col-sm-2 control-label text-right" >发布状态：</label>
			<div class="form-group col-sm-2">
				<!-- <input type="text" class="form-control" v-model="q.status" @keyup.enter="query" placeholder="消息发布状态"> -->
				<select class="form-control"v-model="q.status" @keyup.enter="query" placeholder="消息发布状态">
    				<option value="新建">新建</option>
    				<!-- <option value="待审核">待审核</option>
    				<option value="审核通过">审核通过</option>
    				<option value="已发布">已发布</option> -->
    				<option value="失效">失效</option>
  				</select>
			</div>
			<label class="form-group col-sm-2 control-label text-right" >消息来源：</label>
			<div class="form-group col-sm-2">
				<!-- <input type="text" class="form-control" v-model="q.messageSource" @keyup.enter="query" placeholder="消息来源"> -->
				<select class="form-control"v-model="q.messageSource" @keyup.enter="query" change="qMessageSourceShow"  placeholder="消息来源">
    				<option value="自建消息" selected>自建消息</option>
    				<option value="中转消息">中转消息</option>
  				</select>
			</div>
			<label class="form-group col-sm-2 control-label text-right">展示时间：</label>
			<div class="form-group col-sm-2">
			<!-- <input placeholder="请输入展示时间" type="text" class="form-control laydate-icon"  v-model="q.displayTime" @keyup.enter="query" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"> -->				
			<input type="date" class="form-control" v-model="q.displayTime" @keyup.enter="query" placeholder="展示时间"> 
			</div>
			<label class="form-group col-sm-2 control-label text-right">过期时间：</label>
			<div class="form-group col-sm-2">
				<input type="date" class="form-control" v-model="q.timeExpired" @keyup.enter="query" placeholder="过期时间">
			</div>
	<div class="grid-btn text-right">
		<div  v-show="qMessageSourceStatus">
			<a class="btn btn-success" @click="query"><i class="fa fa-search" aria-hidden="true"></i>&nbsp;查询</a>
			#if($shiro.hasPermission("message:save"))
			<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			#end
			#if($shiro.hasPermission("message:update"))
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			#end
			#if($shiro.hasPermission("message:delete"))
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			#end
		</div>
		<div  v-show="!qMessageSourceStatus">
			<div class="grid-btn">
				<a class="btn btn-success" @click="query"><i class="fa fa-search" aria-hidden="true"></i>&nbsp;查询</a>
			</div>
		</div>
	</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
											<div class="form-group">
			   	<div class="col-sm-2 control-label">消息类型</div>
			   	<div class="col-sm-10">
			   
			   	<select class="form-control" v-model="message.messageType" placeholder="消息类型"  @change="messageTypeShow">
    				<option  v-for="type in typeList" v-bind:value="type.messageTypeName+','+type.displayMode">
      					{{type.messageTypeName}},{{type.displayMode}}
    				</option>
  				</select>
  				<div  v-show="checkImage1"> 
					<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
			<div  v-show="messageTypeShowStatus">

			<div class="form-group">
			   	<div class="col-sm-2 control-label">消息标签</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.messageTag" placeholder="消息标签 如：【热推】、【限时】"/>
			    <div  v-show="checkImage2"> 
					<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">消息标题</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.messageHeader" placeholder="消息标题"/>
			    <div  v-show="checkImage3"> 
					<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
			<div  v-show="messageTypeShowStatus">
									<div class="form-group">
			   	<div class="col-sm-2 control-label">消息简介</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.messageProfile" placeholder="消息简介： 在消息列表上的简介"/>
			      <div  v-show="checkImage4"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div> 
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">消息封面url</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.messageCoverUrl" placeholder="消息封面  在消息列表上的图片"/>
			    <div  v-show="checkImage5"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
												<div class="form-group">
			   	<div class="col-sm-2 control-label">展现方式</div>
			   	<div class="col-sm-10">
			   	<select class="form-control" v-model="message.displayMode" placeholder="展示方式" @change="displayModeShow">
    				<option value="跳转页面">跳转页面</option>
    				<option value="直接打开">直接打开</option>
  				</select>
			    <div  v-show="checkImage6"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>

			<div  v-show="displayModeShowStatus">
									<div class="form-group">
			   	<div class="col-sm-2 control-label">消息内容</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.messageContent" placeholder="消息内容：直接打开的消息需要填写 ，跳转页面的不需要填写"/>
			   <div  v-show="checkImage7"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
			</div>
			<div  v-show="!displayModeShowStatus">
									<div class="form-group">
			   	<div class="col-sm-2 control-label">消息链接</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.messageLink" placeholder="消息链接"/>
			    <div  v-show="checkImage8"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
			</div>
				</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">接收对象</div>
			   	<div class="col-sm-10">
			   	<select class="form-control" v-model="message.receiveMessageObjectType" placeholder="接收消息对象类型" @change="receiveMessageObjectType">
    				<option value="定向">定向</option>
    				<option value="全员">全员</option>
  				</select>
  				<div  v-show="checkImage9"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
			<div v-show="receiveMessageObjectTypeStatus">
									<div class="form-group">
			   	<div class="col-sm-2 control-label">接收消息对象</div>
			   	<div class="col-sm-10">
			   			<textarea rows="3" class="form-control" v-model="message.receiveMessageObjects" placeholder="接收消息对象"></textarea>
			   		<div  v-show="checkImage10"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			   		</div>
			    </div>
			</div>
			<div  v-show="messageTypeShowStatus">
									<div class="form-group">
			   	<div class="col-sm-2 control-label">第三方推送</div>
			   	<div class="col-sm-10">
			   	<select class="form-control" v-model="message.ifPush" placeholder="接收消息对象类型"@change="ifPushShow">
    				<option value=1>是</option>
    				<option value=0>否</option>
  				</select>
  				<div  v-show="checkImage11"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
			
			<div v-show="ifPushStatus">
									<div class="form-group">
			   	<div class="col-sm-2 control-label">推送方式</div>
			   	<div class="col-sm-10">
			      <select class="form-control" v-model="message.whetherPush" placeholder="推送方式"@change="whetherPushShow">
    				<option value=1>即时</option>
    				<option value=0>定时</option>
  				</select>
  				<div  v-show="checkImage12"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
			<div v-show="whetherPushStatus">
									<div class="form-group">
			   	<div class="col-sm-2 control-label">推送时间</div>
			   	<div class="col-sm-10">
			      <input type="datetime-local" class="form-control" v-model="message.pushTime" placeholder="推送时间"/>
			    <div  v-show="checkImage13"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
			</div>
			
			</div>
			</div>
						<!--  		<div class="form-group">
			   	<div class="col-sm-2 control-label">渠道标识</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.channelid" placeholder="渠道标识"/>
			    </div>
			</div>	
									<div class="form-group">
			   	<div class="col-sm-2 control-label">状态</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.status" placeholder="状态"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">消息来源</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.messageSource" placeholder="消息来源"/>
			    </div>
			</div>-->
									<div class="form-group">
			   	<div class="col-sm-2 control-label">展示时间</div>
			   	<div class="col-sm-10">
			      <input type="datetime-local" class="form-control" v-model="message.displayTime" placeholder="展示时间默认是发布时间"/>
			    <div  v-show="checkImage14"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">过期时间</div>
			   	<div class="col-sm-10">
			      <input type="datetime-local" class="form-control" v-model="message.timeExpired" placeholder="过期时间为空，消息一直展示"/>
			    <div  v-show="checkImage15"> 
						<span style="color:red">*必填信息请填写完整后再提交</span>
				</div>
			    </div>
			</div>
					<!-- 				<div class="form-group">
			   	<div class="col-sm-2 control-label">其它1</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.other1" placeholder="其它1"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其它2</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.other2" placeholder="其它2"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其它3</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.other3" placeholder="其它3"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其它4</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.other4" placeholder="其它4"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其它5</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.other5" placeholder="其它5"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其它6</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.other6" placeholder="其它6"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其它7</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.other7" placeholder="其它7"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其它8</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.other8" placeholder="其它8"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其它9</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.other9" placeholder="其它9"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其它10</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.other10" placeholder="其它10"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">发布时间</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.publishtime" placeholder="发布时间"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">发布人</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.publishuser" placeholder="发布人"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">创建时间</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.createtime" placeholder="创建时间"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">创建人</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.createuser" placeholder="创建人"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">修改时间</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.updatetime" placeholder="修改时间"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">修改人</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="message.updateuser" placeholder="修改人"/>
			    </div>
			</div> -->
							<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				<!-- <div  v-show="pendingAuditButton"> -->
					&nbsp;&nbsp;
					<input  v-show="pendingAuditButton" type="button" class="btn btn-primary" @click="pendingAudit" value="提交审核"/>
				<!-- </div>-->
				&nbsp;&nbsp;
				<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<script src="${rc.contextPath}/js/message/message.js?_${date.systemTime}"></script>
<script src="${rc.contextPath}/js/laydate/laydate.js?_${date.systemTime}"></script>
</body>
</html>